package cn.itsource.pethome.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @description: 部门表对应实体类
 * @auth: wujiangbo
 */
@Data
@ToString //相当于重写toString方法
@AllArgsConstructor //相当于全参构造器
@NoArgsConstructor //相当于无参构造器
@Table(name = "t_department")
@ApiModel(description = "部门表对应实体类")
public class Department extends BaseDomain{


    @ApiModelProperty(value = "部门编号")
    private String sn;
    @ApiModelProperty(value = "部门名称")
    private String name;
    @ApiModelProperty(value = "部门状态，0正常，1禁用")
    //部门状态 0 正常 ，-1 停用
    private Integer state;
    @ApiModelProperty(value = "部门状态，0正常，1禁用")
    @Column(name="manager_id")
    private Long managerId;
    @ApiModelProperty(value = "上级部门")
    @Column(name="parent_id")
    private Long parentId;
    @ApiModelProperty(value = "部门经理名称")
    //部门经理名称
    @Transient
    private String managerName;
    @ApiModelProperty(value = "上级部门名称")
    //上级部门名称
    @Transient
    private String parentName;
}